<%
//下载APP
layout("/inc/layout.html",{
title:'公司基本信息 - 工商申请 - 智慧洛龙',
keywords:'公司基本信息,工商申请,智慧洛龙',
description:'公司基本信息,工商申请,智慧洛龙',
style:'index.css'
}){
%>

<section class="container mt15">
    <div id="location-box">
        <div class="panel panel-info">
            <div class="panel-heading text-center center-block">
                <div class="btn-group">
                    <%  layout("/company/title.html"){} %>
                </div>
            </div>
            <div class="panel-body">
                <form class="form-horizontal col-sm-offset-1 col-sm-9" id="companyIndexForm" method="post" role="form">
                    <input id="id" name="id" class="form-control" type="hidden" value="${companyApply.id!}">
                    <legend>公司基本信息&emsp;&emsp;<span class="text text-danger" id="messageCode"></span></legend>
                    <div class="form-group">
                        <label for="companyBrand" class="col-sm-2 control-label">企业名称：</label>
                        <div class="col-sm-5 mt5">
                            <div class="input-group">
                                <div class="input-group-btn">
                                    <select id="region" name="region" class="form-control" style="width: auto;">
                                        <option value="河南">河南</option>
                                        <option value="洛阳">洛阳</option>
                                    </select>
                                </div>
                                <input id="companyBrand" name="companyBrand" class="form-control" type="text" placeholder="字号" required="required" aria-required="true" minlength="2" maxlength="15"
                                       value="${companyApply.companyBrand!}">
                            </div>
                        </div>
                        <div class="col-sm-5 mt5">
                            <div class="input-group">
                                <input id="industry" name="industry" class="form-control" type="text" placeholder="行业" required="required" aria-required="true" minlength="2" maxlength="15"
                                       value="${companyApply.industry!}">
                                <span class="input-group-addon">有限公司</span>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="companyBrand" class="col-sm-2 control-label">备选字号：</label>
                        <div class="col-sm-offset-2 ">
                            <%
                            if(isNotEmpty(brandOptionalList)){
                            for(var i=0;i < 8;i++){
                            if((i+1) <= brandOptionalList.~size){ %>
                            <div class="col-sm-3">
                                <input name="companyBrandOptionalList" class="form-control mt10" type="text" value="${brandOptionalList[i]}">
                            </div>
                            <% }else{ %>
                            <div class="col-sm-3">
                                <input name="companyBrandOptionalList" class="form-control mt10" type="text">
                            </div>
                            <% } } }else{
                            for(var i=0;i < 8;i++){ %>
                            <div class="col-sm-3">
                                <input name="companyBrandOptionalList" class="form-control mt10" type="text">
                            </div>
                            <% } } %>
                        </div>

                    </div>

                    <div class="form-group">
                        <label for="companyAddress" class="col-sm-2 control-label">注册地：</label>
                        <div class="col-sm-10">
                            <div class="input-group">
                                <!--请填写洛阳市洛龙区的地址，具体到门牌号-->
                                <span class="input-group-addon">洛阳市洛龙区</span>
                                <input id="companyAddress" name="companyAddress" class="form-control" type="text" placeholder="请填写详细地址，具体到门牌号" required="required" aria-required="true" minlength="5" maxlength="50" value="${companyApply.companyAddress!}">
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="businessScope" class="col-sm-2 control-label">经营范围：</label>
                        <div class="col-sm-10">
                            <textarea name="businessScope" class="form-control" id="businessScope" rows="5" placeholder="请输入经营范围" required="required">${companyApply.businessScope!}</textarea>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="registeredCapital" class="col-sm-2 control-label">注册资本：</label>
                        <div class="col-sm-10">
                            <div class="input-group">
                                <input id="registeredCapital" name="registeredCapital" class="form-control" type="number" placeholder="请输入注册资本（万元）" required="required" aria-required="true" min="1"
                                       maxlength="10" value="${companyApply.registeredCapital!}">
                                <span class="input-group-addon">万元</span>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="imagesUploader" class="col-sm-2 control-label">证照资料：</label>
                        <div class="col-sm-10" id="upload-file-list">
                            <div id="camera_tool_open"></div>

                            <input id="imagesUploader" name="files" class="form-control" type="file" multiple="multiple" data-msg-placeholder="请选择《租赁合同或房产证》照片，可上传多张。">
                            <div id="error-message"></div>
                            <hr>
                            <div class="center-block row" id="imagesUploadShow">
                                <%  if(isNotEmpty(companyApplyImagesList)){
                                for(companyImage in companyApplyImagesList){  %>
                                <div class="col-xs-12 col-sm-4 mb15">
                                    <div class="thumbnail images-box"><input type="hidden" name="companyImagesList" value="${companyImage.img}"><a
                                            href="${uploaderFilesDomain!'/'}${companyImage.img}" target="_blank"><img
                                            src="${uploaderFilesDomain!'/'}${companyImage.img}"></a></div>
                                    <div class="caption">
                                        <div class="btn btn-block btn-danger deletetCover" onclick="$(this).parent().parent().remove()"><i class="iconfont icon-remove"></i>&nbsp;删除</div>
                                    </div>
                                </div>
                                <%  } }  %>
                            </div>
                        </div>
                    </div>



                </form>
            </div>

            <div class="panel-footer">
                <div class="col-sm-offset-3 clearfix">
                    <div class="mt5 mb5 block col-sm-3">
                        <a href="/user/index" class="btn btn-warning btn-lg btn-outline btn-block">返回列表</a>
                    </div>
                    <div class="mt5 mb5 block col-sm-3">
                        <button type="button" id="doSubmit" class="btn btn-danger btn-lg btn-outline btn-block">下一步</button>
                    </div>
                </div>
            </div>

        </div>
    </div>
</section>
<% } %>
<script src="/static/start/modules/main.js"></script>
<script src="/static/start/modules/Camera.js"></script>
<script>
    require(['modules/company_apply'], function (apply) {
        apply.index();
    });
</script>
</body>
</html>